import { defineStore } from 'pinia'
import { getAllDept } from '@/service/main/common'

interface ICommonState {
  AllDept: any[]
}

const useCommonStore = defineStore('common', {
  state: (): ICommonState => ({
    AllDept: []
  }),
  actions: {
    // 所有部门
    async getAllDeptAction() {
      const res = await getAllDept()
      this.AllDept = res.data
    }
  }
})

export default useCommonStore
